CREATE TABLE [dbo].[sys_dept] (
  [id] bigint  IDENTITY(1,1) NOT NULL COMMENT '自增ID',
  [parent_id] bigint  NULL COMMENT '父级ID',
  [code] nvarchar(20)  DEFAULT '' NULL,
  [type] nvarchar(30)  DEFAULT '' NULL,
  [name] int DEFAULT 0 NULL,
  [short_name] nvarchar(20)   NULL,
  [is_often] nvarchar(11)   NULL,
  [only_one] nvarchar(50)   NULL,
  [is_show] nchar(1)  DEFAULT 0 NULL,
  [sort] nchar(1)  DEFAULT 0 NULL,
  [view_template] nchar(1)  DEFAULT 0 NULL,
  [step_sort] nchar(1)  DEFAULT 0 NULL,
  [symbol] nchar(1)  DEFAULT 0 NULL,
  [view_template] nchar(1)  DEFAULT 0 NULL,
  [create_by] nvarchar(64)  DEFAULT '' NULL,
  [create_time] datetime2(7)  NULL,
  [update_by] nvarchar(64)  DEFAULT '' NULL,
  [update_time] datetime2(7)  NULL,
  [status] int  NULL,
  [is_head] nchar(1)   NULL,
  [head_sort] int  NULL,
  [fast_sort] int  NULL,
  [del_flag] int  NULL,
  [remark] nvarchar(255)   NULL
)